<template>
  <box title="设备统计" class="">
    <!-- 日期选择 -->
    <!-- <template #title-right>
      <div class="flex">
        <div v-for="(item, index) in timeList" :key="index" class="text-[#ffffff] w-[26px] h-[26px]
                   "
             :class="selectTime == index ? 'bg-[url(@/assets/screenimg/samllIcon6.png)]' : 'bg-[url(@/assets/screenimg/samllIcon5.png)]'"
             @click="changeList(item, index)">
          <div class="text-center leading-[26px]">
            {{ isNullOrEmpty( item?.name ) }}
          </div>

        </div>
      </div>
    </template> -->
    <div class="p-[16px] h-[220px]"><!-- :style="{ height: hightdata + 'px' }"-->
      <pie :data="piedata" :withorhight="80"/>
     </div>
      
  </box>
</template>
<script lang="ts" setup>
import { isNullOrEmpty } from '@/utils/functions'
import {screenoverview} from '@/api/screen/largeData'
import box from '@/views/large-data-screen/component/box.vue'
import pie from '@/views/large-data-screen/component/echarts/pie.vue'

const piedata = ref([])
onMounted(() => {
  getscreeninspect()
})


//获取设备统计
const getscreeninspect = () => {
  screenoverview({
  }).then(res => {

    piedata.value = res.result.statistics


  })
}
</script>
